package com.caigou.modules.center.adapter

import com.caigou.modules.center.R
import com.caigou.modules.center.bean.DynamicItemBean
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder

/**
 * @author #Suyghur.
 * Created on 2022/02/09
 */
class DynamicItemAdapter(dataset: MutableList<DynamicItemBean>) : BaseQuickAdapter<DynamicItemBean, BaseViewHolder>(R.layout.item_dynamic_list, dataset) {

    override fun convert(holder: BaseViewHolder, item: DynamicItemBean) {
        holder.setText(R.id.item_dynamic_tv_title, item.title)
        holder.setText(R.id.item_dynamic_tv_time, item.createTime)
        holder.setText(R.id.item_dynamic_tv_like_num, item.nicePointCount.toString())
        holder.setText(R.id.item_dynamic_tv_browse_num, item.browseCount.toString())
        holder.setText(R.id.item_dynamic_tv_comment_num, item.replyCount.toString())
    }
}